<extend name="public@base"/>
block(name="main")
    .container.pt-5
        .row
            php.
                // 查询条件，发布时间>=0
                $where = function($query){
                    $query->where('post.published_time','egt','0');
                };
            portal:articles(item="vo" where="$where" limit="20" order="post.published_time DESC" page="10" relation="categories" pageVarName="" categoryIds="")
                .col-12.pb-3
                    .card.shadow-sm
                        notempty(name="$vo.thumbnail")
                            img(src="{$vo.thumbnail|cmf_get_image_url}" alt="{$vo.post_title}")
                        .card-body
                            h5.card-title
                                a.text-dark.card-link(href!="{:cmf_url('portal/Article/index',array('id'=>$vo['id']))}") {$vo.post_title}
                            p.card-text {$vo.post_excerpt}
                            .card-footer.border-0.bg-transparent.small.p-0
                                .row
                                    .col-auto
                                        span 阅读量：
                                        span {$vo.post_hits}
                                    .col-auto
                                        span 发布时间：
                                        span {:date('Y-m-d',$vo.published_time)}
